from fastapi import FastAPI
import uvicorn

app = FastAPI()


@app.get("/test")
def get_test(data: str = None):
    print("recv:", data)
    return {"recv_data": data}


if __name__ == "__main__":
    uvicorn.run(app, host="0.0.0.0", port=8000)

""" 
测试: python3 ./t5_测试get_携带字符串
{"recv_data":null}
200

{"detail":"Not Found"}
404

"""
